﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Happy.Activities.Domain.WorkflowInstances;

namespace Happy.Activities.Domain.Workflows
{
    /// <summary>
    /// 路由条件。
    /// </summary>
    public interface IRouterCondition
    {
        /// <summary>
        /// 能否执行路由。
        /// </summary>
        bool CanRoute(WorkflowContext context, ActivityInstance fromActivityInstance, Router router);

        /// <summary>
        /// 序列化为字符串。
        /// </summary>
        /// <returns></returns>
        string SerializedToString();
    }
}
